package xuanke;

public class SchoolTest {
    public static void main(String[] args) {
        // ========== 步骤1：实例化教师 ==========
        Teacher t1 = new Teacher("T001", "张教授", "男");
        Teacher t2 = new Teacher("T002", "李讲师", "女");

        // ========== 步骤2：实例化课程并关联教师（教师开课） ==========
        Course c1 = new Course("C001", "Java核心编程", "A栋101", "周一上午");
        Course c2 = new Course("C002", "数据库原理", "B栋202", "周三下午");
        t1.teach(c1); // 张教授讲授Java核心编程
        t2.teach(c2); // 李讲师讲授数据库原理

        // ========== 步骤3：实例化学生并模拟选课/退课 ==========
        Student s1 = new Student("S001", "张三", "男");
        Student s2 = new Student("S002", "李四", "女");

        s1.selectCourse(c1); // 张三选Java核心编程
        s2.selectCourse(c2); // 李四选数据库原理
        s2.dropCourse();     // 李四退课

        // ========== 步骤4：打印学生课表 ==========
        s1.printSchedule();
        s2.printSchedule();
    }
}